package desk;

public class Desk {

    private double length;
    private double width;
    private double height;
    private String color;

    public Desk(double length,double width,double height){
        this.width = width;
        this.length = length;
        this.height = height;

    }

    public Desk(String color){
        this.color = color;
    }




    public Desk(double length,double width,double height ,String color){
        this.color = color;
        this.length =length;
        this.height = height;
        this.width = width;
    }


    public void show(){

        if (length!=0){
            System.out.println("桌子的长为:"+length);
        }
        if (width!=0){
            System.out.println("桌子的宽为:"+width);
        }
        if (height!=0){
            System.out.println("桌子的高为:"+height);
        }
        if (color!=null){
            System.out.println("桌子的颜色为:"+color);
        }

    }


}
